<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title><#if entity.id??>编辑<#else>新增</#if>商品类型表</title>
    <#include "/view/admin/head.html"/>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />


    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/js/bootstrapValidator.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/lang/zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-validator-0.5.3/css/bootstrapValidator.min.css" />


    <style type="text/css">
        .list-path {
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;
        }

        .table-class {
            width: 90%;
            text-align: center;
            border: 1px solid #afd9ee;
            margin: 0 auto;
            margin-top: 50px;
        }

        table th {
            width: 20%;
            background-color: #d9edf7;
            text-align: right;
        }

        table td {
            width: 20%;
            text-align: left;
        }


    </style>
    <script type="text/javascript">

        $(function(){
            //初始化







            $('#czjcommoditytypeForm').bootstrapValidator({
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {






                    typeName:{
                        message: '输入类别出错',
                        validators:{
                            notEmpty: {
                                message: '类别不能为空'
                            },
                            stringLength:{
                                max: 19,
                                message: '类别不能超过 19个字符'
                            }
                        }
                    }



                    ,
                    remark:{
                        message: '输入备注出错',
                        validators:{
                            notEmpty: {
                                message: '备注不能为空'
                            },
                            stringLength:{
                                max: 100,
                                message: '备注不能超过 100个字符'
                            }
                        }
                    }
                }
            });


        });

    </script>
</head>
<body>

<#include "/view/admin/listnav.html"/>


<div class="table-class">
    <#include "/view/admin/opermsg.html"/>
    <form id="czjcommoditytypeForm" action="${base}/czjcommoditytype/save.do"
    >
        <table class="table table-bordered">

            <input type="hidden" style="display: none" name="id" value="${entity.id!}"/>


          <!--
                <th>上一级</th>
                <td>
                    <div class="form-group">
                        <select id="supId" name="supId"
                                class="form-control selectpicker"   data-live-search="true"
                        >
                            <option value="">请选择上一级</option>
                            <#list listSupId as lv>
                                <option value="${lv.value!}"
                                <#if lv.value??&&entity.supId??&&entity.supId == lv.value >
                                    selected="selected"
                                </#if>
                                >${lv.name!}</option>
                            </#list>

                        </select>
                    </div>
                </td>-->


            <tr>
                <th>类别</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="typeName" name="typeName" placeholder="请输入类别" value="${entity.typeName!}">
                    </div>
                </td>
            </tr>


            <tr>

                <th>排序</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="remark" name="remark" placeholder="请输入备注" value="${entity.remark!}">
                    </div>
                </td>
            </tr>


            <tr>
                <td colspan="2" width="100%" style="text-align: center;">
                    <input type="submit" class="btn btn-success " value="保存"/>
                    <span style="width: 20px;">&nbsp;</span>
                    <a class="btn btn-danger " href="javascript:window.history.go(-1)">
                        </span>返回</a>
                </td>
            </tr>

        </table>
    </form>




</div>

<script type="text/javascript">

</script>


</body>
</html>
